#ifndef PRJ_TASK_DETAIL_WIDGET_H
#define PRJ_TASK_DETAIL_WIDGET_H

#include <QWidget>
#include "sqlite_manager.h"

namespace Ui {
class PrjTaskDetailWidget;
}

class PrjTaskDetailWidget : public QWidget
{
    Q_OBJECT

public:
    explicit PrjTaskDetailWidget(QWidget *parent = nullptr);
    ~PrjTaskDetailWidget();
    void setTaskUuid(QString uuid);
    void setTaskInfo(QString taskName, QString taskDescription);

private:
    void initUi();
    void initEvents();
    void initTaskData(QString uuid);

private slots:
    void onSaveBtnClicked();

signals:
    void taskNameChanged(QString text);
    void taskDescriptionChanged(QString text);

private:
    Ui::PrjTaskDetailWidget *ui;
    QString                  m_taskUuid;
    SqliteManager             *m_sqlOperator;
};

#endif // PRJ_TASK_DETAIL_WIDGET_H
